package com.wabbei.friendcenter.action;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import net.sf.json.JSONArray;

import com.webbei.friendcenter.service.MyFriendCenter;

public class CheckNameAction {

	
	private MyFriendCenter friservice;
	private String uname;
	private InputStream inputstream;
	
	public InputStream getInputstream() {
		System.out.println("uname check:"+uname);
		String result="true";
		boolean b=friservice.IsExistTheUserName(uname);
		if(b){
			result="true";//已经存在
		}else{
			result="false";//还没有存在
		}
		inputstream=new ByteArrayInputStream(result.getBytes());
		return inputstream;
	}
	public void setInputstream(InputStream inputstream) {
		this.inputstream = inputstream;
	}
	public MyFriendCenter getFriservice() {
		return friservice;
	}
	public void setFriservice(MyFriendCenter friservice) {
		this.friservice = friservice;
	}
	public String getUname() {
		return uname;
	}
	public void setUname(String uname) {
		this.uname = uname;
	}
	public String check(){
		return "success";
	}
}
